#@datagrid()
#define head_foot()
<!-- lightbox2 -->
<link rel="stylesheet" href="/skin/ui/plugins/lightboxlib/lightbox2/css/lightbox.min.css">
#end
#define content_header()
<h1>
    普通用户管理
    <small>member tables</small>
</h1>
<ol class="breadcrumb">
    <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
    <li><a href="/member/">代理</a></li>
    <li class="active">普通用户管理</li>
</ol>
#end
#define content()
<div class="box">
    <div class="box-header">
        <div class="row">
            <div class="col-md-5">
                <button type="button" class="btn btn-success navbar-btn xsui-btn-refresh">刷新</button>
            </div>
            <div class="col-md-7">
                <form class="navbar-form navbar-right" action="/member/child2/1">
                    <div class="form-group">
                        <input type="text" name="word" class="form-control" placeholder="会员ID..." title="会员ID" value="#(search_word)">
                        <input type="hidden" name="user_id"  value="#(user_id)">
                    </div>
                    <button type="submit" class="btn btn-default">搜索</button>
                </form>
            </div>
        </div>
        
        <div class="row">
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">用户ID</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.user_id??)</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">代理商ID</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.top_agent_id??)</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">注册时间</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.regist_date??)</p>
		            </div>
		        </div>
	        </div>
		</div>
		
        <div class="row">
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">会员名</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.nickname??)</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">手机号</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.mobile??)</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">电子邮箱</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.email??)</p>
		            </div>
		        </div>
	        </div>
		</div>
		
        <div class="row">
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">真实姓名</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.realname??)</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">是否是代理</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.is_agent.toString() == "1" ? "是":"否")</p>
		            </div>
		        </div>
	        </div>
			<div class="col-sm-4">
		        <div class="form-group">
		            <label class="col-sm-4 control-label">用户状态</label>
		            <div class="col-sm-8">
		 				<p>#(itemData.user_status.toString() == "1" ? "正常":"冻结")</p>
		            </div>
		        </div>
	        </div>
		</div>
        
    </div>
    <!-- /.box-header -->
    <div class="box-body">
        <table class="xsui-datagrid table table-condensed table-bordered table-striped table-hover">
            <thead>
                <tr>
                    <th>会员ID</th>
                    <th>会员名</th>
                    <th>姓名</th>
                    <th>账户余额</th>
                    <th>手机号</th>
                    <th>累计提现金额</th>
                    <th>累计充值金额</th>
                    <th>是否是代理</th>
                    <th>一级下线</th>
                    <th>二级下线</th>
                    <th>注册时间</th>
                    <th>用户状态</th>
                </tr>
            </thead>
            <tbody>
                #for(x : listPage.getList())
                <tr data-key="#(x.user_id)">
                    <td>#(x.user_id)</td>
                    <td>#(x.nickname)</td>
                    <td>#(x.realname)</td>
                    <td>#(x.blance)</td>
                    <td>#(x.mobile)</td>
                    <td>#(x.withdraw_amount_total)</td>
                    <td>#(x.recharge_amount_total)</td>
                    <td>#(x.is_agent == "1" ? "是":"否")</td>
                    <td><!-- 一级下线 -->
                    	#if(x.child1_all_count != 0)
                    		<a href="/member/child1?user_id=#(x.user_id)">#(x.child2_all_count)</a>
                    	#else
                    		#(x.child1_all_count)
                    	#end
                    </td>
                    <td><!-- 二级下线 -->
                    	#if(x.child2_all_count != 0)
                    		<a href="/member/child2?user_id=#(x.user_id)">#(x.child1_all_count)</a>
                    	#else
                    		#(x.child2_all_count)
                    	#end
                    </td>
                    <td>#(x.regist_time)</td>
                    <td>#(x.user_status.toString() == "1" ? "正常":"冻结")</td>
                
                </tr>
                #end
            </tbody>
        </table>
        #@paginate(listPage.pageNumber, listPage.totalPage, "/member/child2/")
    </div>
    <!-- /.box-body -->
</div>
<!-- /.box -->
#end
#define body_foot()
<!-- lightbox2 -->
<script src="/skin/ui/plugins/lightboxlib/lightbox2/js/lightbox.min.js"></script>
#end